package net.expectx.pay.gateway.dao.bean;

import java.io.Serializable;
import java.math.BigDecimal;

public class PaymentChannel implements Serializable {
    private Long id;

    /**
     * 逻辑删除（0：否，1：是）
     *
     * @mbg.generated
     */
    private Byte isDeleted;

    /**
     * 创建时间
     *
     * @mbg.generated
     */
    private Long gmtCreate;

    /**
     * 更新时间
     *
     * @mbg.generated
     */
    private Long gmtModified;

    private String name;

    private BigDecimal rate;

    private BigDecimal payRate;

    private String settlementCycle;

    private String useCase;

    private Long orders;

    /**
     * 1 支付宝 2 微信 3 银联
     *
     * @mbg.generated
     */
    private Byte type;

    private String channelAttr;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Byte getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Byte isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Long getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Long gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Long getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Long gmtModified) {
        this.gmtModified = gmtModified;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getRate() {
        return rate;
    }

    public void setRate(BigDecimal rate) {
        this.rate = rate;
    }

    public BigDecimal getPayRate() {
        return payRate;
    }

    public void setPayRate(BigDecimal payRate) {
        this.payRate = payRate;
    }

    public String getSettlementCycle() {
        return settlementCycle;
    }

    public void setSettlementCycle(String settlementCycle) {
        this.settlementCycle = settlementCycle;
    }

    public String getUseCase() {
        return useCase;
    }

    public void setUseCase(String useCase) {
        this.useCase = useCase;
    }

    public Long getOrders() {
        return orders;
    }

    public void setOrders(Long orders) {
        this.orders = orders;
    }

    public Byte getType() {
        return type;
    }

    public void setType(Byte type) {
        this.type = type;
    }

    public String getChannelAttr() {
        return channelAttr;
    }

    public void setChannelAttr(String channelAttr) {
        this.channelAttr = channelAttr;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", gmtCreate=").append(gmtCreate);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append(", name=").append(name);
        sb.append(", rate=").append(rate);
        sb.append(", payRate=").append(payRate);
        sb.append(", settlementCycle=").append(settlementCycle);
        sb.append(", useCase=").append(useCase);
        sb.append(", orders=").append(orders);
        sb.append(", type=").append(type);
        sb.append(", channelAttr=").append(channelAttr);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PaymentChannel other = (PaymentChannel) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
            && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getRate() == null ? other.getRate() == null : this.getRate().equals(other.getRate()))
            && (this.getPayRate() == null ? other.getPayRate() == null : this.getPayRate().equals(other.getPayRate()))
            && (this.getSettlementCycle() == null ? other.getSettlementCycle() == null : this.getSettlementCycle().equals(other.getSettlementCycle()))
            && (this.getUseCase() == null ? other.getUseCase() == null : this.getUseCase().equals(other.getUseCase()))
            && (this.getOrders() == null ? other.getOrders() == null : this.getOrders().equals(other.getOrders()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getChannelAttr() == null ? other.getChannelAttr() == null : this.getChannelAttr().equals(other.getChannelAttr()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getRate() == null) ? 0 : getRate().hashCode());
        result = prime * result + ((getPayRate() == null) ? 0 : getPayRate().hashCode());
        result = prime * result + ((getSettlementCycle() == null) ? 0 : getSettlementCycle().hashCode());
        result = prime * result + ((getUseCase() == null) ? 0 : getUseCase().hashCode());
        result = prime * result + ((getOrders() == null) ? 0 : getOrders().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getChannelAttr() == null) ? 0 : getChannelAttr().hashCode());
        return result;
    }
}
